package com.example.microservice.http.impl.server;

import com.example.microservice.http.service.server.TimingService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

/**
 * @Author: caohuijie
 * @Date: 创建日期 2018/11/7
 * @Modified By:
 * @Description: 定时任务类
 */
@Service
public class TimingServiceImpl implements TimingService {

    private int count=0;

    @Scheduled(cron="*/6 * * * * ?")
    @Override
    public void timingTask() {
        System.out.println("this is scheduler task runing  "+(count++));
    }
}
